/**
 * 
 */
package com.fsoft.tinhcd.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.fsoft.tinhcd.bussiness.CustomerBussiness;
import com.fsoft.tinhcd.model.Customers;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author caodangtinh
 * 
 */
@Component
public class CustomerAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Autowired
	private CustomerBussiness customerBussiness;

	public CustomerAction() {
	}

	//
	private List<Customers> listCustomer;

	//
	/**
	 * get List Customer
	 */
	public String listAllCustomer() {
		try {
			this.listCustomer = customerBussiness.listCustomer();
		} catch (Exception e) {
			e.getMessage();
		}
		return SUCCESS;
	}

	public List<Customers> getListCustomer() {
		return listCustomer;
	}

	public void setListCustomer(List<Customers> listCustomer) {
		this.listCustomer = listCustomer;
	}

}
